package com.hanhai.zrb.backend.web.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.alibaba.fastjson.JSONObject;
import com.hanhai.common.web.controller.BaseController;
import com.hanhai.zrb.api.biz.service.ProjectFundSequenceService;

@Controller
@RequestMapping("projectfundno")
public class ProjectFundNoController extends BaseController{

	@Resource
	private ProjectFundSequenceService projectFundNoService;
	
	@RequestMapping("nextProjectNo")
	public void nextProjectNo(Model model, HttpServletResponse response){
		String nextProjectNo=projectFundNoService.getNextProjectSequence();
		JSONObject jsonObject = new JSONObject();
		jsonObject.put("nextProjectNo", nextProjectNo);
		super.returnJsonObject(response, jsonObject);
	}
	
	@RequestMapping("nextFundNo")
	public void nextFundNo(Model model, HttpServletResponse response){
		String nextFundNo=projectFundNoService.getNextFundSequence();
		JSONObject jsonObject = new JSONObject();
		jsonObject.put("nextFundNo", nextFundNo);
		super.returnJsonObject(response, jsonObject);
	}
	
}
